(function(){
    'use strict';
    angular.module('module.business')
        .controller('DetailRecordRevController', DetailRecordRevController);

    DetailRecordRevController.$inject= ['$scope','$uibModalInstance', '$uibModal'];

    function DetailRecordRevController($scope,$uibModalInstance, $uibModal ) {
        var vm = $scope;
        vm.retrieveRecordsInfo = retrieveRecordsInfo;
        vm.ok = ok;                                     //点击'是'按钮时执行
        vm.cancel = cancel;                             //点击'否'按钮时执行

        return vm;

        function retrieveRecordsInfo() {
            var modalInstance = $uibModal.open({
                animation: true,
                ariaLabelledBy: 'modal-title',
                ariaDescribedBy: 'modal-body',
                templateUrl: 'certificateAward.html',
                controller: 'CertificateAwardController',
                controllerAs: 'certificateAward',
                size: 'lg',
                resolve: {
                    recordNo: function(){
                        return vm.recordNo;
                    }
                }
            });
            modalInstance.result.then(function () {
                //doSomething
            }, function () {
                //doSomething
            });
        }


        /**
         * @description 点击'是'按钮时执行
         */
        function ok() {
            $uibModalInstance.close(selected);
        }

        /**
         * @description 点击'否'按钮时执行
         */
        function cancel() {
            $uibModalInstance.dismiss('cancel');
        }
    }
})();